<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<style type="text/css">
		*{padding: 0;margin: 0;}
		div{
			background: #181818;
			display:block;
			width: 460px;
			text-align: center;
			color: #fff;
			font-size: 40px;
		}
		ul{	
			width: 460px;
			margin: 0 auto;
			border-top: 5px solid #A3FE47;
			padding-top: 10px;
			display: inline-block;
			background: #181818;
			zoom:1;
		}
		ul:after{
			
			display: block;
			content: "";
			clear: both;
		}
		li{
			padding-bottom: 5px;
			margin: 0 10px ;
			text-align: center;
			list-style-type: none;
			float: left;
			background: url(bg.jpg) 0 0 no-repeat;
		}
		p{
			color: #A3FF47;
			font-size: 40px;
			line-height: 92px;
			width: 95px;
			height: 92px;
		}
		span{
			display:block;

			width: 95px;
			font-size: 22px;
			color: #9C9C9C;
			padding: 5px 0px;
			border-bottom: 5px solid #A3FE47;
		}
	</style>
	<script type="text/javascript">
		window.onload=function () {
			function timer () {
				var time =new Date("2016/10/1");
				var now = new Date();
				var miao=(time.getTime()-now.getTime())/1000;
				var day=Math.floor(miao/86400);
				var hour=Math.floor((miao%86400)/3600);
				var fen =Math.floor(((miao%86400)%3600)/60);
				var miaoshi =Math.floor(((miao%86400)%3600)%60);
				var oday=document.getElementById("day");
				var ohour=document.getElementById("hour");
				var ofen=document.getElementById("fen");
				var omiao=document.getElementById("miao");
				if (day<10) {
					day="0"+day;
				};
				if (hour<10) {
					hour="0"+hour;
				};
				if (fen<10) {
					fen="0"+fen;
				};
				if (miaoshi<10) {
					miaoshi="0"+miaoshi;
				};
				oday.innerHTML=day;
				ohour.innerHTML=hour;
				ofen.innerHTML=fen;
				omiao.innerHTML=miaoshi;
			}
			setInterval(timer, 1000);
		}
	</script>
</head>
<body>
	<div>距离国庆还有</div>
	<ul id="timer">
		<li><p id="day"></p><span>天</span></li>
		<li><p id="hour"></p><span>小时</span></li>
		<li><p id="fen"></p><span>分钟</span></li>
		<li><p id="miao"></p><span>秒</span></li>
	</ul>
</body>
</html>